package devaluator.functionality;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;


public class GetProjectPath {
	
	public static String getDir(String aString) {
		IWorkspace ws = ResourcesPlugin.getWorkspace();
		IWorkspaceRoot root = ws.getRoot();
		IProject proj = root.getProject(aString);
		String rString = null;
		
		// Get location for all open projects
		
			if(proj.isOpen()) {
				rString = (proj.getLocation().toString());
			}
		
		return rString;
	}
	
}